package com.spring.springboot.controller;

import com.spring.springboot.pojo.User;
import javafx.scene.input.DataFormat;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.text.DateFormat;
import java.util.Date;

/**
 * @author lking
 * @date 2019/11/27 20:26
 **/

@Controller
public class ViewController {

    @RequestMapping(value = "/view")
    public String query(Model m) {

        m.addAttribute("now", DateFormat.getDateInstance().format(new Date()));

        return "hello";
    }
}

